<template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png" />
    <HelloWorld msg="Welcome to Your Vue.js App" />
    <SelectTreeDan
      v-model="dan"
      :selectKey="'title'"
      :treeData="tree"
      filterable
    ></SelectTreeDan>
  </div>
</template>

<script>
import HelloWorld from "./components/HelloWorld.vue"
import SelectTreeDan from "../packages/SelectTreeDan/src/index.vue"

export default {
  name: "App",
  components: {
    HelloWorld,
    SelectTreeDan,
  },
  data() {
    return {
      dan: "",
      tree: [
        {
          title: "parent 1",
          expand: true,
          children: [
            {
              title: "parent 1-1",
              expand: true,
              children: [
                {
                  title: "leaf 1-1-1",
                },
                {
                  title: "leaf 1-1-2",
                },
              ],
            },
            {
              title: "parent 1-2",
              expand: true,
              children: [
                {
                  title: "leaf 1-2-1",
                },
                {
                  title: "leaf 1-2-1",
                },
              ],
            },
          ],
        },
      ],
    }
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
